<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 300px;
            height: 150px;
            border: 1px solid pink;
        }

        span {

            display: block;
            height: 20px;
            line-height: 20px;
            color: gray;
        }
    </style>
</head>

<body>
    <div>
        <span></span>
        <span></span>
    </div>
    <script>
        const gift = '50g茶叶,清洗球'
        // const arr = gift.split(',')
        // const newarr = arr.map(item => ` <span>【赠品】${item}</span><br>`).join('')
        // document.querySelector('div').innerHTML = newarr
        // 简写
        document.querySelector('div').innerHTML = gift.split(',').map(item => ` <span>【赠品】${item}</span><br>`).join('')
    </script>
</body>

</html>